<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>avalon: Provider Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">avalon
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_provider-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">Provider Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">

<p>服务提供者基类  
 <a href="#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="provider_8h_source.html">provider.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac375eb53ec353273c0b7b7d158d6faa1" id="r_ac375eb53ec353273c0b7b7d158d6faa1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac375eb53ec353273c0b7b7d158d6faa1">Provider</a> (const std::string &amp;app_name, const std::string &amp;sub_name)</td></tr>
<tr class="memdesc:ac375eb53ec353273c0b7b7d158d6faa1"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造函数  <br /></td></tr>
<tr class="separator:ac375eb53ec353273c0b7b7d158d6faa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb1ccb11858d2b3cadf089ab51ed0eac" id="r_afb1ccb11858d2b3cadf089ab51ed0eac"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afb1ccb11858d2b3cadf089ab51ed0eac">received</a> (<a class="el" href="struct_provider_data.html">ProviderData</a> *req, <a class="el" href="struct_provider_data.html">ProviderData</a> *res)=0</td></tr>
<tr class="memdesc:afb1ccb11858d2b3cadf089ab51ed0eac"><td class="mdescLeft">&#160;</td><td class="mdescRight">处理接收到的请求的纯虚函数  <br /></td></tr>
<tr class="separator:afb1ccb11858d2b3cadf089ab51ed0eac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0a1ed1eae60e5d72e590c7cc54c93e8" id="r_af0a1ed1eae60e5d72e590c7cc54c93e8"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af0a1ed1eae60e5d72e590c7cc54c93e8">appName</a> () const</td></tr>
<tr class="memdesc:af0a1ed1eae60e5d72e590c7cc54c93e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取应用名称  <br /></td></tr>
<tr class="separator:af0a1ed1eae60e5d72e590c7cc54c93e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9bec34d924dbf22a4f27fa4a19c66f67" id="r_a9bec34d924dbf22a4f27fa4a19c66f67"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9bec34d924dbf22a4f27fa4a19c66f67">subName</a> () const</td></tr>
<tr class="memdesc:a9bec34d924dbf22a4f27fa4a19c66f67"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取子名称  <br /></td></tr>
<tr class="separator:a9bec34d924dbf22a4f27fa4a19c66f67"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>服务提供者基类 </p>
<p>该类用于创建服务提供者对象，提供者可以接收和处理请求。通过定义服务的名称和子名称来初始化提供者对象。 </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ac375eb53ec353273c0b7b7d158d6faa1" name="ac375eb53ec353273c0b7b7d158d6faa1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac375eb53ec353273c0b7b7d158d6faa1">&#9670;&#160;</a></span>Provider()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Provider::Provider </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>app_name</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>sub_name</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>构造函数 </p>
<p>初始化Provider对象，设置应用名称和子名称。</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">app_name</td><td>应用名称，标识提供者所属的应用 </td></tr>
    <tr><td class="paramname">sub_name</td><td>子名称，用于进一步描述提供者的特定方面 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="af0a1ed1eae60e5d72e590c7cc54c93e8" name="af0a1ed1eae60e5d72e590c7cc54c93e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af0a1ed1eae60e5d72e590c7cc54c93e8">&#9670;&#160;</a></span>appName()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Provider::appName </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取应用名称 </p>
<dl class="section return"><dt>Returns</dt><dd>std::string 返回提供者的应用名称 </dd></dl>

</div>
</div>
<a id="afb1ccb11858d2b3cadf089ab51ed0eac" name="afb1ccb11858d2b3cadf089ab51ed0eac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb1ccb11858d2b3cadf089ab51ed0eac">&#9670;&#160;</a></span>received()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool Provider::received </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_provider_data.html">ProviderData</a> *</td>          <td class="paramname"><span class="paramname"><em>req</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_provider_data.html">ProviderData</a> *</td>          <td class="paramname"><span class="paramname"><em>res</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>处理接收到的请求的纯虚函数 </p>
<p>提供者类必须实现该函数以处理请求和生成响应。</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">req</td><td>指向接收到的请求数据的指针 </td></tr>
    <tr><td class="paramname">res</td><td>指向要发送的响应数据的指针 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bool 表示请求处理是否成功的布尔值 </dd></dl>

</div>
</div>
<a id="a9bec34d924dbf22a4f27fa4a19c66f67" name="a9bec34d924dbf22a4f27fa4a19c66f67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9bec34d924dbf22a4f27fa4a19c66f67">&#9670;&#160;</a></span>subName()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Provider::subName </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取子名称 </p>
<dl class="section return"><dt>Returns</dt><dd>std::string 返回提供者的子名称 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>E:/avalon/src/libavalon/<a class="el" href="provider_8h_source.html">provider.h</a></li>
<li>E:/avalon/src/libavalon/<b>provider.cpp</b></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
